package com.baozun.houji.goods.adapter

import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.widget.TextView
import com.baozun.houji.goods.R
import com.zhy.view.flowlayout.FlowLayout
import com.zhy.view.flowlayout.TagAdapter

/**
 * @Title：搜索历史适配器
 * @Description：
 * @Author：xing.luo
 * @Since：2022/11/10
 * @Version：1.0.0
 */
class SearchHistoryAdapter(val context: Context, data: MutableList<String>) : TagAdapter<String>(data) {
    override fun getView(parent: FlowLayout?, position: Int, t: String?): View {
        val tag: TextView = LayoutInflater.from(context).inflate(R.layout.search_history_tag_layout, null) as TextView
        tag.text = t
        return tag
    }
}